package com.tca.springboot.learning.controller;

import com.tca.springboot.learning.req.TestReq;
import com.tca.springboot.learning.resp.TestResp;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhoua
 * @Date 2021/10/11
 */
@RestController
@RequestMapping("/hello")
public class HelloController {

	@GetMapping("/test")
	public TestResp test(TestReq req) {
		TestResp testResp = new TestResp();
		testResp.setReturnName(req.getName());
		testResp.setReturnAge(req.getAge());
		return testResp;
	}

}
